package cultu.customer.service;

import org.granite.messaging.service.annotations.RemoteDestination;

import cultu.core.message.Context;
import cultu.customer.message.Offer;
import cultu.customer.message.OfferCriteria;
import cultu.customer.message.OfferList;
import cultu.customer.message.OfferScenario;

/**
 * The Interface OfferManager.
 */
@RemoteDestination(id="offerManager", channel="my-amf")
public interface OfferManager {

  /**
   * Get offer.
   *
   * @param pContext the context.
   * @param pScenario the scenario.
   * @param pKey the key.
   * @return the offer
   */
  Offer getOffer (Context pContext, OfferScenario pScenario, Offer pKey);

  /**
   * Create the offer.
   *
   * @param pContext the context.
   * @param pScenario the scenario.
   * @param pOffer the offer.
   * @return the offer
   */
  Offer createOffer (Context pContext, OfferScenario pScenario, Offer pOffer);

  /**
   * Delete the offer.
   *
   * @param pContext the context.
   * @param pScenario the scenario.
   * @param pKey the key.
   * @return the offer
   */
  Offer deleteOffer (Context pContext, OfferScenario pScenario, Offer pKey);

  /**
   * Updates the offer.
   *
   * @param pContext the context.
   * @param pScenario the scenario.
   * @param pOffer the offer.
   * @return the offer
   */
  Offer updateOffer (Context pContext, OfferScenario pScenario, Offer pOffer);

  /**
   * Find the offers.
   *
   * @param pContext the context.
   * @param pScenario the scenario.
   * @param pCriteria the criteria.
   * @return the offer list
   */
  OfferList findOffers (Context pContext, OfferScenario pScenario, OfferCriteria pCriteria);

  /**
   * Delete the offers.
   *
   * @param pContext the context.
   * @param pScenario the scenario.
   * @param pList the offer list.
   * @return the offer list
   */
  OfferList deleteOffers (Context pContext, OfferScenario pScenario, OfferList pList);

  /**
   * Create offers.
   *
   * @param pContext the context.
   * @param pScenario the scenario.
   * @param pList the offer list.
   * @return the offer list
   */
  OfferList createOffers (Context pContext, OfferScenario pScenario, OfferList pList);

  /**
   * Updates offers.
   *
   * @param pContext the context.
   * @param pScenario the scenario.
   * @param pList the offer list.
   * @return the offer list
   */
  OfferList updateOffers (Context pContext, OfferScenario pScenario, OfferList pList);
}
